<script setup>
import MsgContent from './jsx/msgContent'
const router = useRouter()
const gotoAllMsg = () => {
  if (router.currentRoute.value.path === '/allMsg') {
    router.go(0)
    return
  }
  router.push('/allMsg')
}
</script>

<template>
  <div class="msg-content">
    <t-tooltip content="时间" theme="light">
      <i-octicon:calendar class="calendar" />
    </t-tooltip>
    <MsgContent />
  </div>
  <div class="see-all" @click="gotoAllMsg">
    <i-cil:hand-point-right />
    <span style="padding-left: 4px">全部消息</span>
  </div>
</template>

<style scoped>
.see-all {
  width: 100px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: rgb(17, 101, 149);
}

.see-all:hover {
  text-decoration: underline;
}

.calendar {
  font-size: 14px;
  margin: 0 4px 0 10px;
}

.msg-content {
  width: calc(100% - 100px);
  display: flex;
  align-items: center;
  font-size: 14px;
}
</style>